// 组织架构
import request from '@/utils/request'
// 新增部门
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 查询部门
export function getDepartment() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}

// 修改部门
export function updateDepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

// 删除部门
export function delDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

// 根据id查询部门
export function getDepartmentById(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
